package com.entor.service;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSON;
import com.entor.dao.CocsInfoDaoI;
import com.entor.model.CocsInfo;
import com.entor.model.Msg;

@Service
public class CocsInfoService implements BaseServiceI<CocsInfo>{

	@Autowired
	private CocsInfoDaoI cidi;
	
	public List<CocsInfo> find(CocsInfo t) {
		return cidi.find(t);
	}

	public CocsInfo get(CocsInfo t) {
		// TODO Auto-generated method stub
		return null;
	}

	public Msg insert(CocsInfo t) {
		// TODO Auto-generated method stub
		return null;
	}

	public Msg batchInsert(String objs) {
		CocsInfo list = JSON.parseObject(objs, CocsInfo.class);
		int i = cidi.insert(list);
		Msg m = new Msg("保存失败", false);
		return i>0?m = new Msg("成功保存"+i+"条记录!", true):m;
	}

	public Msg edit(CocsInfo t) {
		// TODO Auto-generated method stub
		return null;
	}

	public Msg remove(Integer id) {
		// TODO Auto-generated method stub
		return null;
	}

	public Msg batchRemove(String ids) {
		// TODO Auto-generated method stub
		return null;
	}

}
